﻿namespace TestSBIP
{
    public class TestFilter : SBIP.Filter.BaseFilter
    {
        private float threshold;
        /// <summary>
        /// The threshold for determining, if a channel will be increased or 
        /// decreased.
        /// </summary>
        /// <remarks>Default value: 0.5f</remarks>
        public float Threshold
        {
            get { return threshold; }
            set
            {
                //if (Effect == null)
                //    throw new System.ArgumentException("Threshold" + InitMsg);

                threshold = value;
                Effect.Parameters["Threshold"].SetValue(Threshold);
            }
        } 

        public TestFilter(string effectFile) : base(effectFile) {}

        /// <summary>
        /// Sets the start value of property <see cref="Threshold"/>.
        /// </summary>
        protected override void PostInit()
        {
            Threshold = 0.5f;
        }
    }
}
